#ifndef DIALOGTRAINING_H
#define DIALOGTRAINING_H

#include "ui_DialogTraining.h"
#include <QDialog>
#include "typedefs.h"

namespace Ui {
class DialogTraining;
}

class DialogTraining : public QDialog
{
	Q_OBJECT

public:
	DialogTraining(QWidget *parent = 0);
	inline void beginTraining(void) {
		currentStep = 1;
		ui->buttonOk->hide();
		ui->buttonNext->show();
		ui->buttonStop->show();
		showWord();
	}
	inline void setWordList(WordList *list) {
		p_list = list;
		allSteps = list->size();
	}
	inline void setType(unsigned type) { p_type = type; }
	~DialogTraining();
private slots:
	void nextStep();
	void showWord();
private:
	WordList *p_list;
	unsigned p_type;
	unsigned allSteps;
	unsigned currentStep;
	WordItem *currentWord;
	QTimer *timer;
	Ui::DialogTraining *ui;
};

#endif // DIALOGTRAINING_H
